import java.util.Random;
public class App {

    public static void main(String[] args) throws Exception {
        int number=10;
        Random rand=new Random();
        Sort sort=new HeapSort();
        int data[]=new int[number];
        for(int i=0;i<number;i++)
        {
            data[i]=rand.nextInt(number*2);
        }
       boolean ifS=sort.IsSorted(data);
       long start = System.nanoTime();
       sort.MySort(data);
       long end = System.nanoTime();

       boolean ifS1=sort.IsSorted(data);
       System.out.println("排序时间：" + (end - start) / 1e6 + " ms");
       if(ifS1)
       {
       System.out.println("正确");
       }
    //    CompareSelection compareSelection=new CompareSelection();
    //    int m=compareSelection.find(data, 10);
    //    sort.MySort(data);
    }
} 
